package com.pchy.bussiness.pc;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

/**
 * 
 * @ClassName: Demo 
 * @Description: 增删改查demo
 * @author 唐赫
 * @date 2014-5-4 14:33:19
 *
 */
@Controller("mobileDemo")
@RequestMapping("/pc/demo")
public class Demo {
	@RequestMapping("/list")
	public ModelAndView list(){
		return new ModelAndView("/pc/demo/list");
	}
	@RequestMapping("/getDatas")
	public @ResponseBody Map<String, Object> getDatas(){
		Map<String, Object> result = new HashMap<String, Object>();
		List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
		Map<String, Object> map1 = new HashMap<String, Object>();
		map1.put("id", 1);
		map1.put("name", "唐赫");
		map1.put("sex", "男");
		map1.put("createtime", new Date());
		list.add(map1);
		Map<String, Object> map2 = new HashMap<String, Object>();
		map2.put("id", 2);
		map2.put("name", "张金星");
		map2.put("sex", "男");
		map2.put("createtime", new Date());
		list.add(map2);
		result.put("resultList", list);
		result.put("total", 30);
		return result;
	}
}
